package com.example.controller;

import com.example.redis.service.JedisLockUtil;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RequestMapping
@RestController
public class RedisController {
    @Resource
    private JedisLockUtil jedisLockUtil;

    @GetMapping("/send/{str}")
    public void testLock(@PathVariable String str){
        jedisLockUtil.tryLock(str,1,20);
    }
}
